﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using Microsoft.Phone.Tasks;
using Microsoft.Phone.Controls;
using DnnDash.SimplePhoneApp.Common;
using DnnDash.SimplePhoneApp.ViewModel;

namespace DnnDash.SimplePhoneApp
{
    public partial class AboutPage : PhoneApplicationPage
    {
        public AboutPage()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Event handler to handle when this page is navigated to
        /// </summary>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            uiClientVersion.Text = "Client: 1.0"; // TODO read dashboard.Version;
            uiServerVersion.Text = "Server: 1.0";  // TODO read dashboard.VersionOnServer;
        }

        private void OnEmailFeedbackClick(object sender, RoutedEventArgs e)
        {
            EmailComposeTask emailComposeTask = new EmailComposeTask();
            emailComposeTask.To = "wemyster@outlook.com";
            emailComposeTask.Subject = "DNN Dash Lite version 1.0" + ""; // TODO use dashboard.Version;
            emailComposeTask.Body = "Just wanted to let you know the following...";
            emailComposeTask.Show();
        }

        private void OnDNNLinkClick(object sender, RoutedEventArgs e)
        {
            WebBrowserTask webBrowserTask = new WebBrowserTask();
            webBrowserTask.Uri = new Uri("http://www.DotNetNuke.com", UriKind.Absolute);
            webBrowserTask.Show();
        }
    }
}